import { BASE_URI } from "@/utils/const";
import request from '@/utils/request.js'
const WARE_BASE_URL = '/wsdetail';
export default {
    getWareHouseList(warehouseDto){
        return request({
            url: BASE_URI + WARE_BASE_URL + '/list',
            data:{
                "page_no":warehouseDto.pageNo,
                "page_size":warehouseDto.pageSize,
                "warehouse_name":warehouseDto.warehouseName
            },
            method: 'post'
        })
    },
    showAllWareName(){
        return request({
            url: BASE_URI + WARE_BASE_URL + '/list',
            data:{},
            method: 'post'
        })
    },
    updateWare(wareDto){
        return request({
            url: BASE_URI + WARE_BASE_URL + '/updateWare',
            data:{
                "id":wareDto.id,
                "warehouse_name":wareDto.warehouseName
            },
            method: 'post'
        })
    },
    saveWare(wareDto){
        return request({
            url: BASE_URI + WARE_BASE_URL + '/saveWs',
            data:{
                "warehouse_name":wareDto.warehouseName
            },
            method: 'post'
        })
    },
    removeWare(id){
        return request({
            url: BASE_URI + WARE_BASE_URL + '/removeWare',
            params:{"id":id},
            method: 'post'
        })
    }
}